
public class Car {

public enum type{
	LARGE,SMALL
}
	private String reg_number;
	private type type_car;
	private int fuel;
	private boolean rented;
	
	public Car (String reg_number){
		
		this.reg_number=reg_number;
		if(check_reg_number(reg_number)){
			System.out.println("ok");
		}
		else
			System.out.println("");
		this.type_car=type_car;
		if(this.type_car==type.LARGE)
			this.fuel=60;
		else
			this.fuel=49;		
			
		
	}
	

	public String getReg_number() {
		return reg_number;
	}

	public void setReg_number(String reg_number) {
		this.reg_number = reg_number;
	}
	
	private boolean check_reg_number(String reg_number){
		int i =1;
		if(reg_number.length()==5){
			if((int)reg_number.charAt(0)>96 && (int)reg_number.charAt(0)<123){
				
				while(i<5){
					if((int)reg_number.charAt(i)>47 && (int)reg_number.charAt(i)<58)
						i++;
					else{
						System.out.println("flag1");
						return false;
					}
				}
				return true;
				
			
			}
		System.out.println("flag3");
		return false;
	}
		System.out.println("flag4");
		return false;

	
	}
	public int getFuel(){
		return this.fuel;
	}
	
	public boolean isfuel(){
		if(this.type_car==type.LARGE){
			if(this.fuel==60){
				return true;
			}
			else{
				return false;
			}
		}
		else{
			if(this.fuel==49){
				return true;
			}
			else{
				return false;
			}
		}
				
	}
	
	public boolean isRented  (){
		return this.rented;
	}
}
